#ifndef __ESP8266_H__
#define __ESP8266_H__
#include "stm32f1xx_hal.h"

#define ATK_MW8266D_EOK         0   /* 没有错误 */
#define ATK_MW8266D_ERROR       1   /* 通用错误 */
#define ATK_MW8266D_ETIMEOUT    2   /* 超时错误 */
#define ATK_MW8266D_EINVAL      3   /* 参数错误 */

										
uint8_t ESP8266_Sent_AT(char *cmd, char *ack, uint32_t timeout); // atk_mw8266d_send_at_cmd -> ESP8266_Sent_AT
uint8_t ESP8266_Reset(void);//atk_mw8266d_sw_reset -> ESP8266_Reset
uint8_t ESP8066_Mode(uint8_t mode);
uint8_t ESP8266_AT(void);
uint8_t ESP8266_ATE(uint8_t cfg);
uint8_t ESP8266_WiFi(char *ssid, char *pwd);
uint8_t ESP8266_MQTTUSERCFG(char *UserName, char *PassWord);
uint8_t ESP8266_MQTTCLIENTID(char *ClientID);
uint8_t ESP8266_MQTTCONN(char *Domain_Name,int Port,int Reconnect);
uint8_t ESP8266_MQTTSUB(char *Post);
uint8_t ESP8266_SendUDP(char *data);
uint8_t ESP8266_ReceiveUDP(void);

#endif